package po.record;

import java.time.LocalDateTime;

import po.emp.Department;

/**
 * 管理的文档
 * @author admin
 *
 */
public class Document {
	private int docId;
	private String title; 
	private LocalDateTime incomeTime;  //入档时间
	private boolean rent;   //借出状态
	private DocumentType type;  //文档类型
	private DocumentLevel level; //文档等级
	private Department depart;   //文档的部门
	private boolean docdeleteflag;
	
	public Document() {
		super();
	}

	public Document(int docId, String title, LocalDateTime incomeTime, DocumentType type,
			DocumentLevel level, Department depart) {
		super();
		this.docId = docId;
		this.title = title;
		this.incomeTime = incomeTime;
		this.type = type;
		this.level = level;
		this.depart = depart;
	}

	public Document(int docId, String title, LocalDateTime incomeTime) {
		super();
		this.docId = docId;
		this.title = title;
		this.incomeTime = incomeTime;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + docId;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Document other = (Document) obj;
		if (docId != other.docId)
			return false;
		return true;
	}

	public int getDocId() {
		return docId;
	}

	public void setDocId(int docId) {
		this.docId = docId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public LocalDateTime getIncomeTime() {
		return incomeTime;
	}

	public void setIncomeTime(LocalDateTime incomeTime) {
		this.incomeTime = incomeTime;
	}

	public boolean isRent() {
		return rent;
	}

	public void setRent(boolean rent) {
		this.rent = rent;
	}

	public DocumentType getType() {
		return type;
	}

	public void setType(DocumentType type) {
		this.type = type;
	}

	public DocumentLevel getLevel() {
		return level;
	}

	public void setLevel(DocumentLevel level) {
		this.level = level;
	}

	public Department getDepart() {
		return depart;
	}

	public void setDepart(Department depart) {
		this.depart = depart;
	}

	public boolean isDocdeleteflag() {
		return docdeleteflag;
	}

	public void setDocdeleteflag(boolean docdeleteflag) {
		this.docdeleteflag = docdeleteflag;
	}

	@Override
	public String toString() {
		return "Document [docId=" + docId + ", title=" + title + ", rent=" + rent + "]";
	}
	
	
	
	
	
}
